package wo.esys.vo;

import java.util.Date;

import wo.common.util.WoUtil;
import wo.esys.po.User;

/**
 * session中的用户数据
 * 
 * @author cailei
 * @date 2018年11月13日
 */
public class WoUser {
	
	/**
	 *
	 */
	private static final long serialVersionUID = 8498380110342879997L;

	private String id;

	private String loginName;

	private String password = "123456";

	private String headImage;

	private Date createTime;

	private String rolesId = "";

	private String rolesName = "";

	public WoUser() {
	}

	/**
	 * @param u
	 */
	public WoUser(User u) {
		this.id = u.getId();
		this.loginName = u.getLoginName();
		this.password = u.getPassword();
		this.createTime = u.getCreateTime();
	}

	public String getRolesId() {
		return rolesId;
	}

	public void setRolesId(String rolesId) {
		this.rolesId = rolesId;
	}

	public String getRolesName() {
		return rolesName;
	}

	public void setRolesName(String rolesName) {
		this.rolesName = rolesName;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getLoginName() {
		return loginName;
	}

	public void setLoginName(String loginName) {
		this.loginName = loginName;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getHeadImage() {
		if (WoUtil.isEmpty(headImage)) {
			return "img/user.png";
		}
		return headImage;
	}

	public void setHeadImage(String headImage) {
		this.headImage = headImage;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

}
